/*
 * SizeAdmissionControl.cc
 *
 *  Created on: 2011-04-15
 *      Author: awjastrzebski
 */

#include "SizeAdmissionControl.h"

Define_Module(SizeAdmissionControl)

void SizeAdmissionControl::initialize()
{
	AbstractAdmissionControl::initialize();

	minSize = par("minSize");
	maxSize = par("maxSize");
}

bool SizeAdmissionControl::acceptPacket(NetPacket* packet)
{
	return packet->getByteLength() >= minSize && packet->getByteLength() <= maxSize;
}
